#!/bin/sh

#clean 

rm -f cmake_install.cmake
rm -f Makefile
rm -r CMakeFiles
rm -f CMakeCache.txt

#generate makefiles/project

read -p "Use Clang? (y/n): " -e use_clang
echo $use_clang
if [ $use_clang = 'y' ]; then
	export CC=/usr/bin/clang
	echo $CC
	export CXX=/usr/bin/clang++
	echo $CXX
else
	export CC=/usr/bin/gcc
	echo $CC
	export CXX=/usr/bin/g++
	echo $CXX
fi

read -p "Generate Xcode project? (y/n): " -e xcode

if [ $xcode = 'y' ]; then
	cmake -G "Xcode"
else
	cmake -G "Unix Makefiles"
fi

